<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org"
      xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<head th:include="common_css :: commonHeader('角色列表')"></head>
<body>
<!--搜索框-->
<form method="post" id="tabfrom">
    <div style="padding:2px" class="easyui-panel" title="数据查询">
        <table class="form-table">
            <tr>
                <td align="right" width="10%">所属机构：</td>
                <td>
                    <input id="selOrgId" style="width:350px" class="easyui-combotree" multiple="multiple"
                           cascadeCheck="true" data-options="prompt:'==请选择==',panelHeight:'auto'"/>
                </td>
            </tr>
        </table>
        <table class="form-table">
            <tr>
                <td align="right" width="10%">角色名称：</td>
                <td align="left"><input id="selName" style="width:150px" class="easyui-validatebox"/></td>
                <td align="right" width="10%">角色类型：</td>
                <td align="left">
                    <input id="selType" style="width:150px" class="easyui-combobox"
                           data-options="valueField:'value',textField:'showmsg'
                       ,panelHeight:'auto',prompt:'==请选择=='"/>
                <td align="right" width="10%">角色状态：</td>
                <td align="left"><input style="width:150px" id="selStatus"
                                        data-options="valueField:'value',textField:'showmsg'
                                    ,panelHeight:'auto',prompt:'==请选择=='" class="easyui-combobox"/>
                    <a class="easyui-linkbutton" iconCls='icon-search' onclick="doSearch();">查询</a>
                </td>
                </td>
            </tr>
        </table>
    </div>
    <br>
</form>


<div id="toolbar">
    <shiro:hasPermission name="system:role:add">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-add"
           onclick="addRole()">添加</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="system:role:edit">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-edit"
           onclick="editRole()">修改</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="system:role:del">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-cancel"
           onclick="delRole()">删除</a>
    </shiro:hasPermission>
    <shiro:hasPermission name="system:role:ent">
        <a href="javascript:void(0)" class="easyui-linkbutton" iconcls="icon-redo"
           onclick="roleEnt()">角色权限</a>
    </shiro:hasPermission>
</div>

<div id="dg"></div>


<div id="dlg" class="easyui-dialog" style="width:360px;height:450px"
     closed="true" modal="true" maximizable="true" resizable="true">
    <div style="margin-left: 50px;margin-top: 2px;">
        <input id="ss" class="easyui-searchbox" style="width:200px"
               data-options="prompt:'搜 索'"/>
        <ul id="treeContent" class="easyui-tree"></ul>
    </div>
    <input type="hidden" id="authRoleId">
    <form id="myform" method="post">

    </form>
</div>

<div id="dlgDetail" class="easyui-dialog" style="width:650px;height:400px"
     closed="true" modal="true" maximizable="true" resizable="true">


    <form id="myformDetail" method="post">
        <div style="padding:20px">
            <table cellpadding="2px" cellspacing="0" class="form-table">
                <tr>
                    <td>角色名称：</td>
                    <td>
                        <input class="easyui-validatebox"
                               data-options="required:true" missingMessage="请输入角色名称"
                               validType="chinese" name="name"/>
                        <input type="hidden" id="id" class="textbox" name="id">
                    </td>
                    <td>角色类型：</td>
                    <td>
                        <input id="type" name="type" class="easyui-combobox"
                               data-options="required:true,valueField:'value',textField:'showmsg',prompt:'==请选择==',panelHeight:'auto'"
                               missingMessage="请维护角色类型" validType="comboxValidate['type','请维护角色类型']"/>
                    </td>
                </tr>
                <tr>
                    <td>所属机构：</td>
                    <td colspan="3">
                        <input id="orgId" name="orgId" style="width:350px"
                               data-options="required:true,prompt:'==请选择==',panelHeight:'auto'"
                               class="easyui-combotree"
                               missingMessage="请维护机构信息" validType="comtreeValidate['orgId','请维护机构信息']"/>
                    </td>
                </tr>
                <tr>
                    <td>角色说明：</td>
                    <td colspan="3">
                        <input class="easyui-textbox" name="description"
                               data-options="multiline:true" style="height:80px;width:350px"/>
                    </td>
                </tr>
            </table>
        </div>

    </form>

</div>
<div th:include="common_js :: commJS"></div>
<script type="text/javascript"
        th:src="@{/js/system/role.js}"></script>
</body>


</html>
